/*
 * KiKernel.h
 *
 *  Created on: 2013-10-18
 *      Author: WinDDK
 */

#ifndef KIKERNEL_H_
#define KIKERNEL_H_

#include "KiPE.h"
#include "KiHook.h"
#include "KiWin32K.h"
//#include "KiDebug.h"

class KiKernel: public KiPE
{
public:
    KiKernel();
    virtual ~KiKernel();

    BOOLEAN GetModulePath();
    BOOLEAN FixModule();
private:
    KiHook *mHook;
    KiWin32K * mWin32kPE;
    //KiDebugPort* mDebug;

    BOOLEAN GetKernelName(OUT PCHAR moduleName);
    BOOLEAN FixSSDT(PSYSTEM_SERVICE_TABLE oldSSDT, PSYSTEM_SERVICE_TABLE newSSDT, ULONG newImageBase, ULONG oldImageBase);
    BOOLEAN FixShadowSSDT();
    BOOLEAN GetOldShadowSSDT(PSYSTEM_SERVICE_TABLE & oldShadowSSDT);
    BOOLEAN LoadWin32K();
    BOOLEAN GetPIDByProcessName(PWCHAR  pProcessName, ULONG & processHandle);
    BOOLEAN HookKiFastCallEntry();
    BOOLEAN FixDebugPort();
};

#endif /* KIKERNEL_H_ */
